<?php 
require_once ( 'app-config.php');
include get_header_page();
?>

<?php

// Get parameters
$productid = $_GET['pid'];

// Get products list
$product = get_product($productid);
$categoryid = $product['category_id'];

?>
<script type="text/javascript">
$(document).ready(function() {

	$("a#single_image").fancybox({
		openEffect : 'elastic',
		closeEffect : 'elastic',
		closeClick : true,
		helpers : {overlay : null}
	});
	
});
</script>

<!-- MAIN_CONTAINER -->
<div id="main_container">
	<br>
	<!-- FRAME -->
	<div id="frame">

		<!-- BEGIN CONTENT -->
		<div id="content">

			<div id="content-inner">
				<div id="head-top-inner">
					<div id="head-title-inner">
						<h2>
							<?php _echo($product['name_zh_CN']); ?>
						</h2>
					</div>
				</div>

				<div class="maincontent">
					<a id="single_image" href="<?php echo IMG_PRODUCT_DIR.'/'.$product['photo_id'];?>">
					<img src="<?php echo IMG_PRODUCT_DIR.'/'.$product['photo_id'];?>"
						 alt="<?php echo $product['name_zh_CN'];?>" class="imgleft" width="130px" height="125px"/>
					</a>
					
					<p>
					<?php echo $product['description_zh_CN'];?>
					</p>
					<div class="clr"></div>
				</div>
			</div>
			<?php include ('siderbar.php');?>
		</div>
		<!-- END OF CONTENT -->
	</div>
	<!-- END OF FRAME -->
</div>
<!-- END OF MAIN_CONTAINER -->

<?php include get_footer_page();?>
